package com.tanhua.sso.controller;

import com.tanhua.common.service.UploadPicService;
import com.tanhua.common.vo.UploadPicResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/upload")
public class UploadPicController {
    @Autowired
    private UploadPicService uploadPicService;

    @PostMapping("/pic")
    public UploadPicResult uploadPic(@RequestParam("file") MultipartFile multipartFile) {
        return uploadPicService.uploadPic(multipartFile);
    }
}
